<template>
  <div>
    <!--面包屑导航-->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>产品服务</el-breadcrumb-item>
      <el-breadcrumb-item>维修进度</el-breadcrumb-item>
    </el-breadcrumb>
    <el-tabs v-model="activeTab" tab-position="right" style="height: 100%">
      <el-tab-pane v-for="process in processTabs" :key="process.name" :label="process.title" :name="process.name" :disabled="process.disabled">
        <component :is=process.content></component>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
// 自定义组件
import infoTab from './tabs/InfoTab'
import repairTab from './tabs/RepairTab'
import finalTestTab from './tabs/FinalTestTab'
import shipOutTab from './tabs/ShipOutTab'

export default {
  data() {
    return {
      processTabs: [{
        title: '基本信息',
        name: 'info',
        disabled: false,
        content: 'infoTab'
      }, {
        title: '维修信息',
        name: 'repair',
        disabled: false,
        content: 'repairTab'
      }, {
        title: '测试信息',
        name: 'finalTest',
        disabled: false,
        content: 'finalTestTab'
      }, {
        title: '邮寄信息',
        name: 'shipOut',
        disabled: false,
        content: 'shipOutTab'
      }],
      activeTab: 'info'
    }
  },
  components: {
    finalTestTab,
    infoTab,
    repairTab,
    shipOutTab
  }
}
</script>

<style lang="less" scoped>
  .tabContent {
    height: 100%;
  }
</style>
